#ifndef SERVERSECTIONMODEL_H
#define SERVERSECTIONMODEL_H

#include "standard-table-section-model.h"

class ServerSectionModel : public StandardTableSectionModel
{
    Q_OBJECT
public:
    explicit ServerSectionModel(QObject *parent = 0);

    enum ServerSectionColumn
    {
        NameColumn,
        AddressColumn,
        PortColumn
    };

    QVariant id (int row, int column) const;
    ValueResult* canAddData (QVariantList dataList);
    ValueResult* canUpdateData (QVariant value, int row, int column);
    ValueResult* canSetField (QVariant value, int column, int row = -1);
    ValueResult* canSetRow (QVariantList dataList, int row = -1);
    bool setData (const QModelIndex &index, const QVariant &value, int role);

public slots:
    void initialize();
    void loadData();
    void addData (QVariantList dataList);
    void updateData (QVariant data, int row, int column);
    void removeData (QVariantList dataList);
    void removeData (QVariant data);
    void saveSettings();
};

#endif // SERVERSECTIONMODEL_H
